﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Collections;


namespace TouchUmlUI
{
    public class PopupMenuNotice : PopupMenuBase
    {
        private void ChangeNoticeNameClick(object sender, RoutedEventArgs e)
        {
            ((PopupMenuItem)sender).parent.gUmlObj.ustawNazwe("NOWA NAZWA!");
        }

        public void SetContentClick(object sender, RoutedEventArgs e)
        {
            GUML guml = ((PopupMenuItem)sender).parent.gUmlObj;
            //m.Notice notice = (m.Notice)guml.obj_uml;
            //notice.noticeText = "PRZYKŁADOWY TEKST NOTATKI\nLorem ipsum\nProgramownie Zespołowe</html>";
            ((NotatkaObj)guml.umlobj).Refresh();
        }
        
        public PopupMenuNotice(int a_xPos, int a_yPos, System.Windows.Controls.Primitives.StatusBar a_statusbar)
            : base(a_xPos, a_yPos, "Popup notatki")
        {
            AddItem(new PopupMenuItem(this, "icon1.png", "Zmien nazwe", ChangeNoticeNameClick,"gfx\\item_bg.png"));
            AddItem(new PopupMenuItem(this, "icon1.png", "Ustaw content", SetContentClick,"gfx\\item_bg.png"));
        }
    }
}
